/**
 * 
 */
package com.lvan.bean;

import java.util.Date;

import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.springframework.format.annotation.DateTimeFormat;

import com.lvan.constant.NotNull;
import com.lvan.constant.Size;
import com.lvan.util.CustomDateSerializer;
import com.lvan.util.DateUtil;


/**
 * @author Stern He<br>
 * 2013-9-17<br>
 * @version 1.0.0.0 
 */
public class Product extends AdvanceEntity {
	private static final long serialVersionUID = -5552804402573962779L;
	private int productId;
    @NotNull(message="产品名称不能为空")
    @Size(Max=50,message="产品名称太长")
    private String productName;
    @Size(Max=50,message="产品条码太长")
    private String barCode;
    @Size(Max=100,message="原产地太长")
    private String placeOfOrigin;
    @Size(Max=100,message="出品公司名太长")
    private String nameOfCorp;
    @Size(Max=50,message="电话号码太长")
    private String telOfCorp;
    private Date lastProductionDate;
    private int dateUnit;
    private int remainderDate;
    private int preRemind;
    @DateTimeFormat(pattern=DateUtil.DATAFORMAT_SIMPLE)
    private Date validDate;
    private int value;
    private String name;
    
    public int getValue()
	{
		return productId;
	}
	public String getName()
	{
		return productName;
	}
	public int getProductId() {
        return productId;
    }
    public void setProductId(int productId) {
        this.productId = productId;
    }
    public String getProductName() {
        return productName;
    }
    public void setProductName(String productName) {
        this.productName = productName;
    }
    public String getBarCode() {
        return barCode;
    }
    public void setBarCode(String barCode) {
        this.barCode = barCode;
    }
    public String getPlaceOfOrigin() {
        return placeOfOrigin;
    }
    public void setPlaceOfOrigin(String placeOfOrigin) {
        this.placeOfOrigin = placeOfOrigin;
    }
    public String getNameOfCorp() {
        return nameOfCorp;
    }
    public void setNameOfCorp(String nameOfCrop) {
        this.nameOfCorp = nameOfCrop;
    }
    public String getTelOfCorp() {
        return telOfCorp;
    }
    public void setTelOfCorp(String telOfCrop) {
        this.telOfCorp = telOfCrop;
    }
    public Date getLastProductionDate() {
        return lastProductionDate;
    }
    public void setLastProductionDate(Date lastProductionDate) {
        this.lastProductionDate = lastProductionDate;
    }
    @JsonSerialize(using = CustomDateSerializer.class)
    public Date getValidDate() {
        return validDate;
    }
    public void setValidDate(Date validDate) {
        this.validDate = validDate;
    }
    public int getDateUnit() {
        return dateUnit;
    }
    public void setDateUnit(int dateUnit) {
        this.dateUnit = dateUnit;
    }
    public int getRemainderDate() {
        return remainderDate;
    }
    public void setRemainderDate(int remainderDate) {
        this.remainderDate = remainderDate;
    }
    public int getPreRemind() {
        return preRemind;
    }
    public void setPreRemind(int preRemind) {
        this.preRemind = preRemind;
    }
    
}
